from django.conf.urls import url
from views import *

app_name = 'mathtest'

'''
OU=oneuknown
'''

urlpatterns = [
    url(r'^$', Homepage.as_view(), name='homepage'),
    url(r'^test$', test_view, name='test'),

    # Test related
    url(r'^OUtest/gen/(?P<pk>[0-9]+)/$', OUtestgenView.as_view(), name='OUtestgen'),
    url(r'^OUtest/score/(?P<test_id>[0-9]+)/$', OUNewtestscore, name='OUtestscore'),
    url(r'^OUtest/result/$', OUtestresult.as_view(), name='OUtestresult'),
    url(r'^OUtest/detail/(?P<pk>[0-9]+)/$', OUtestDetailView.as_view(), name='OUtestdetail'),
    # url(r'^OUtest/redolastwrong/$', Redolastwrong.as_view(), name='redolastwrong'),
    url(r'^OUtest/redotestwrong/(?P<test_id>[0-9]+)/$', redoTestWrong, name='redotestwrong'),
    url(r'^OUtest/redotestscore/(?P<test_id>[0-9]+)/$', redoTestWrongScore, name='redotestscore'),
    url(r'^OUtest/stats/$', ExamList.as_view(), name='examlist'),

    # mistake question related
    url(r'^mistake/list/$', MistakeListView.as_view(), name='mistakelist'),
    url(r'^mistake/add/$', MistakeCreateView.as_view(), name='mistakecreate'),
    #url(r'^mistake/detail/(?P<pk>[0-9]+)/$', MistakeDetailView.as_view(), name='mistakedetail'),
    url(r'^mistake/detail/(?P<pk>[0-9]+)/$', mistake_detail_view, name='mistakedetail'),
    url(r'^mistake/update/(?P<pk>[0-9]+)/$', MistakeUpdateView.as_view(), name='mistakeupdate'),
    url(r'^mistake/archive/set/(?P<pk>[0-9]+)/$', archiveQuestion, name='mistakearchive'),
    url(r'^mistake/archive/restore/(?P<pk>[0-9]+)$', resetToMistakeSetQuestion, name='mistakearchiverestore'),
    url(r'^mistake/archive/list/$', MistakeArchiveListView.as_view(), name='mistakearchivelist'),
    url(r'^mistake/practice/(?P<pk>[0-9]+)/$', MistakePracticeListView.as_view(), name='mistakepractice'),
    url(r'^mistake/score/(?P<test_id>[0-9]+)/$', MistakeNewtestscore, name='mistaketestscore'),
    url(r'^mistake/redomistakewrong/(?P<test_id>[0-9]+)/$', redoMistakeWrong, name='redomistakewrong'),
    url(r'^mistake/redomistakewrongScore/(?P<test_id>[0-9]+)/$', redoMistakeWrongScore, name='redomistakewrongScore'),
    url(r'^mistake/practice/result', MistakePracticeResult.as_view(), name='mistakepracticeresult'),
    url(r'^mistake/practicedetail/(?P<pk>[0-9]+)/$', MistakepracticeDetailView.as_view(), name='mistakepracticedetail'),

    # url(r'^question/genquesitons/$', genQuestions, name='genequations'),

    #exam related
    url(r'^exam/add/$', exam_add, name='examadd'),
    url(r'^exam/list/$', ExamListView.as_view(), name='examlist'),
    url(r'^exam/detail/(?P<pk>[0-9]+)$', ExamDetailView.as_view(), name='examdetail'),
    url(r'^exam/update/(?P<test_id>[0-9]+)$', exam_add, name='examupdate'),

]
